<template>
	<view class="wo-page">
		<u-empty class="u-maggin-top-20" :text="errorMessage"></u-empty>
        <view class="u-text-center">
            <text>如无法使用，请联系微信/QQ：229417598反馈，谢谢～</text>
        </view>
        <view class="u-flex">
            <u-button size="mini" shape="circle" @click="rebootFunc">清理缓存重试</u-button>
        </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				errorMessage: '发生了错误'
			};
		},
		onLoad(option) {
			let that = this;
			if (option.message) {
				that.errorMessage = option.message;
			}
		},
        methods: {
            rebootFunc() {
                try {
                    uni.clearStorageSync();
                    this.$u.route({
                        type: 'reLaunch',
                        url: 'pages/index'
                    });
                } catch (error) {
                    this.$u.toast('缓存清理失败');
                }
            }
        }
	}
</script>

<style lang="scss">

</style>
